﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Globalization;
using System.Collections.Specialized;
using System.Threading.Tasks;
using System.Threading;
using WCrawlerLib;

namespace WCrawler
{
    /// <summary>
    /// test repository
    /// </summary>
    public partial class _Default : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            //enable javascript
            this.Page.Header.DataBind();

            if (!IsPostBack)
            {
                System.Net.ServicePointManager.Expect100Continue = false;

                //Panel pnlCommand = (Panel)ucForumControl.FindControl("pnlCommand");
                //pnlCommand.Visible = false;
                //Panel pnlSearch = (Panel)ucForumControl.FindControl("pnlSearch");
                //pnlSearch.Visible = false;
                //GridView gridViewForums = (GridView)ucForumControl.FindControl("gridViewForums");
                
                //CommandField cmdField = (CommandField)gridViewForums.Columns[0];
                //cmdField.ShowSelectButton = false;
            }
        }

        //public void ucForumControlSelectedIndexChanged(object sender, EventArgs e)
        //{
        //    Session["ucForum_GridViewForums"] = (GridView)ucForumControl.FindControl("gridViewForums");
        //    Session["ucForum_SelectedValue"] = ucForumControl.SelectedValue;
        //    if (TabContainerPost.ActiveTabIndex == 0)
        //    {
        //        ucForumTopics.ucForumControlSelectedIndexChanged();
        //    }
        //    else if (TabContainerPost.ActiveTabIndex == 1)
        //    {
        //        GridView gridViewForumTemplates = (GridView)ucForumTemplates.FindControl("gridViewForumTemplates");
        //        gridViewForumTemplates.DataBind();
        //    }
        //    else if (TabContainerPost.ActiveTabIndex == 2)
        //    {
        //        ucForumThreadPosts.SearchForumThreadDataBind();
        //    }
        //}

        //protected void btnForumThreadPostsTrigger_Click(object sender, EventArgs e)
        //{
        //    ucForumThreadPosts.SearchForumThreadDataBind();
        //}

        //protected void btnForumTopicsTrigger_Click(object sender, EventArgs e)
        //{
        //    ucForumTopics.ucForumControlSelectedIndexChanged();
        //}

        //protected void btnForumTemplatesTrigger_Click(object sender, EventArgs e)
        //{
        //    GridView gridViewForumTemplates = (GridView)ucForumTemplates.FindControl("gridViewForumTemplates");
        //    gridViewForumTemplates.DataBind();
        //}
        
    }
}
